﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DLMemberPointMS.Common

{
    public enum code
    {
        Error = -1,
        Success = 0
    }
    public class OperateResult
    {
        public code code { get; set; }
        public string msg { get; set; }
        public int count { get; set; }
        public object data { get; set; }


        /// <summary>
        /// 分页
        /// </summary>
        /// <param name="status"></param>
        /// <param name="msg"></param>
        /// <param name="data"></param>
        public OperateResult(code status, string msg, object data, int count)
        {
            this.code = status;
            this.msg = msg;
            this.count = count;
            this.data = data;
        }
        /// <summary>
        /// 返回数据
        /// </summary>
        /// <param name="status"></param>
        /// <param name="msg"></param>
        /// <param name="data"></param>
        public OperateResult(code status, string msg, object data)
        {
            this.code = status;
            this.msg = msg;
            this.data = data;
        }

        /// <summary>
        /// 返回状态
        /// </summary>
        /// <param name="status"></param>
        /// <param name="msg"></param>
        public OperateResult(code status, string msg)
        {
            this.code = status;
            this.msg = msg;
        }

    }
}
